🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / ble / src / commonMain / kotlin / org / meshtastic / core / ble / BleDevice.kt
Displaying Raw • Download
core/ble/src/commonMain/kotlin/org/meshtastic/core/ble/BleDevice.kt 4d4070c8e1ed73a56ee2f054300a0f62e3fe2e62 (4d4070c8) Text, 1.89 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.ble
Tff7b72import T7ee787kotlinx.coroutines.flow.StateFlow
T8b949e/** Represents a BLE device. */
Tff7b72interface T56d364BleDevice Tb4b4b4{
T8b949e/** The device's name. */
Tff7b72val Te6edf3nameTb4b4b4: Tffa657String?
T8b949e/** The device's address. */
Tff7b72val Te6edf3addressTb4b4b4: Tffa657String
T8b949e/** The current connection state of the device. */
Tff7b72val Te6edf3stateTb4b4b4: Te6edf3StateFlowTff7b72<Te6edf3BleConnectionStateTff7b72>
T8b949e/** Whether the device is bonded. */
Tff7b72val Te6edf3isBondedTb4b4b4: Tffa657Boolean
T8b949e/** Whether the device is currently connected. */
Tff7b72val Te6edf3isConnectedTb4b4b4: Tffa657Boolean
T8b949e/**
* The RSSI reported by the most recent scan advertisement for this device, in dBm.
*
* `null` for devices that have not been observed via a scan (e.g. bonded-only devices retrieved from the OS). This
* is a snapshot — to see live updates, observe a flow of [BleDevice] instances from [BleScanner].
*/
Tff7b72val Te6edf3rssiTb4b4b4: Tffa657Int?
Tff7b72getTb4b4b4(Tb4b4b4) Tff7b72= Tff7b72null
T8b949e/**
* Reads the current RSSI value in dBm, or `null` when no reading is available (no live connection and no scan
* advertisement). 0 dBm is the strongest value on this scale, so it must never stand in for "unknown".
*/
Tff7b72suspend Tff7b72fun Td2a8ffreadRssiTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657Int?
T8b949e/** Bond the device. */
Tff7b72suspend Tff7b72fun Td2a8ffbondTb4b4b4(Tb4b4b4)
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.06s